import { request } from "@/utils/request";
import type { Data, DoctorData, likeRes } from "@/types/home";
// 首页文章列表 /patient/home/knowledge
export const getKnowledgeList = (
  type: string,
  current: number,
  pageSize: string
) =>
  request<Data>("/patient/home/knowledge", "GET", { type, current, pageSize });

// 关注的医生列表 /home/page/doc
export const getDoctorListApi = (current: string, pageSize: string) =>
  request<DoctorData>("/home/page/doc", "GET", { current, pageSize });

// 关注 like
export const likeApi = (type: string, id: string) =>
  request<likeRes>("/like", "POST", { type, id });
